package com.wawayaya.db.entitydao;


import com.wawayaya.bean.Books;
import com.wawayaya.db.DBManager;
import com.wawayaya.db.basedao.BooksDao;

public class BookEntityDao extends BaseEntityDao<BooksDao, Books, Long> {

	@Override
	protected BooksDao initEntityDao() {
		return DBManager.newSession().getBookDao();
	}

	public void deleteEntityByKey(Integer key) {
		getEntityDao().datelBookById(key);
	}

    @Override
    public void replaceEntity(Books entity) {
        getEntityDao().insertOrReplaceInTx(entity);
    }

	@Override
	public Books queryEntityByKey(Long key) {
		return super.queryEntityByKey(key);
	}

	@Override
	public Books queryEntityByWhere(String where, String... selectionArg) {
		return super.queryEntityByWhere(where, selectionArg);
	}
}
